package com.ftx.controller.test.annotation.importTest;

import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

/**
 * Created by fengtingxin on 2020/4/14.
 */
public class MyImportSelector implements ImportSelector {

    /**
     * 返回值就是 需要导入的组件的全类名
     * @param importingClassMetadata 标注 的类的全部信息
     * @return
     */
    @Override
    public String[] selectImports(AnnotationMetadata importingClassMetadata) {

        //不可以返回null
        return new String[]{"com.ftx.controller.test.annotation.importTest.Blue"};
    }
}
